from typing import Union

import uvicorn
from fastapi import FastAPI

app = FastAPI()

@app.get("/get")
async def get_test():
    return {"method": "get方法"}


@app.post("/post")
async def post_test():
    return {"method": "post方法"}


@app.put("/put")
async def put_test():
    return {"method": "put方法"}


@app.delete("/delete")
async def delete_test():
    return {"method": "delete方法"}

if __name__ == '__main__':
    uvicorn.run("02路径操作装饰器方法:app", host="127.0.0.1", port=8080, reload=True)
